/*
 * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 *
 * This file is part of Harmattan SmashMiner OpenGL game application.
 * 
 * Harmattan SmashMiner OpenGL Example Application version 1.0.0
 *  
 * Latest update: 15.4.2011
 *
 * The Harmattan SmashMiner OpenGL example application demonstrates how to use 
 * the OpenGL ES in Harmattan devices.
 *
 * This example is provided as a starting point for 3rd party
 * developers (you) to ease the implementation of OpenGL based 
 * games. Ideas, parts of code or methodologies that this
 * example application uses can be freely used without restrictions.
 *
 * See file README.txt how to build and compile this example application
 * in the Harmattan SDK environment. 
 * 
 * See file INSTALL.txt to find out what is required to run this
 * application and how to install the application to the device or
 * alternatively in QEMU-emulator.
 *
 * The LICENSE.txt file explains the license this software is provided
 * with. A copy of the same license is included in this source file.
 * 
 */

/*
 * Copyright (C) 2011 by Nokia Corporation.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

/// \file defines.h Defines for SmashMiner.

#ifndef DEFINES_H
#define DEFINES_H

#include "config.h"

/// \typedef The floating-point datatype used by the game engine
typedef float FPtype;

// SmashMiner settings:
//^^^^^^^^^^^^^^^^^^^^^^
/*! \def SMASHMINER_CONFIG_FPS_PROFILING_INTERVAL
FPS profiling interval.
Worst frame within iterval is printed.
1 = every frame is printed.
5 = Worst frame of the five is printed.
*/
#define SMASHMINER_CONFIG_FPS_PROFILING_INTERVAL 1

/*! \def SMASHMINER_MAINLOOP_TIMER_MSECS
Game mainloop timer interval.
This setting defines the upper limit for the game framerate.
For example when defined to 10: 1000 / 10 = 100 fps.
*/
#define SMASHMINER_MAINLOOP_TIMER_MSECS 10

/*! \def SMASHMINER_CONFIG_REWIND_PERIOD_SECONDS
Length of the rewind at seconds when the player dies.
*/
#define SMASHMINER_CONFIG_REWIND_PERIOD_SECONDS 5.00

/*! \def SMASHMINER_CONFIG_LONGEST_EFFECT_PERIOD
Maximum game effect period at seconds, needed for the rewind mode.
Expands the rewind mode for effects past the #SMASHMINER_CONFIG_REWIND_PERIOD_SECONDS so that the effects appear correctly on rewind.
*/
#define SMASHMINER_CONFIG_LONGEST_EFFECT_PERIOD 1.50

/*! \def SMASHMINER_CONFIG_REWIND_BUFFER_CAPACITY
Capacity of the rewind buffer.
When framerate 100 fps * duration 5 seconds = 500 records total.
Make this setting somewhat bigger, just to be sure.
*/
#define SMASHMINER_CONFIG_REWIND_BUFFER_CAPACITY 750

/*! \def SMASHMINER_CONFIG_PARTICLE_BUFFER_CAPACITY
Capacity of the particle buffer.
\sa #SMASHMINER_CONFIG_PARTICLE_LIFETIME
*/
#define SMASHMINER_CONFIG_PARTICLE_BUFFER_CAPACITY 2000

/*! \def SMASHMINER_CONFIG_PARTICLE_LIFETIME
Lifetime of the particle at seconds in the particle buffer.
If lifetime is increased also the \c #SMASHMINER_CONFIG_PARTICLE_BUFFER_CAPACITY needs to be increased.
\sa #SMASHMINER_CONFIG_PARTICLE_BUFFER_CAPACITY
*/
#define SMASHMINER_CONFIG_PARTICLE_LIFETIME 1.0

/*! \def VIEW_RANGE_XY
X and Y scale of the OpenGL view.
The XY value is an average of X and Y values. The actual X and Y values are computed based on screen dimensions,
still the average of the X and Y is always the VIEW_RANGE_XY.
For example if VIEW_RANGE_XY is 100.0 and the screen aspect ratio is 16:9 then the X is 128 and the Y is 72.
\sa GameWidget::setViewRange
*/
#define VIEW_RANGE_XY   100.0

/*! \def VIEW_RANGE_Z
View Z scale.
*/
#define VIEW_RANGE_Z    100.0

/*! \enum TextureIndex
 *
 * Indices to \c GameWidget::textureNames.
 * 
 */
enum TextureIndex {
    /// Background texture
    TextureIndexBG=0,
    /// Bomb texture
    TextureIndexBomb,
    /// Hyper jump texture
    TextureIndexHyperJump,
    /// Number 0 texture
    TextureIndexNumber0,
    /// Number 1 texture
    TextureIndexNumber1,
    /// Number 2 texture
    TextureIndexNumber2,
    /// Number 3 texture
    TextureIndexNumber3,
    /// Number 4 texture
    TextureIndexNumber4,
    /// Number 5 texture
    TextureIndexNumber5,
    /// Number 6 texture
    TextureIndexNumber6,
    /// Number 7 texture
    TextureIndexNumber7,
    /// Number 8 texture
    TextureIndexNumber8,
    /// Number 9 texture
    TextureIndexNumber9,
    /// Letter X texture
    TextureIndexLetterX,
    /// Letter X texture
    TextureIndexLetterColon,
    /// Miner count texture
    TextureIndexMiner,
    /// Rewind R letter texture
    TextureIndexRewindR,
    /// Time label texture
    TextureIndexTime,
    /// Get ready label texture
    TextureIndexGetReady,
    /// Level label texture
    TextureIndexLevel,
    /// Level small label texture
    TextureIndexLevelSmall,
    /// Game Over label texture
    TextureIndexGameOver,
    /// Paused label texture
    TextureIndexPaused,
    /// Pause button texture
    TextureIndexButtonPause,
    /// Play button texture
    TextureIndexButtonPlay,
    /// Ball mode button texture
    TextureIndexButtonModeBall,
    /// Cone mode button texture
    TextureIndexButtonModeCone,
    /// Bomb button texture
    TextureIndexButtonBomb,
    /// Comet enemy texture
    TextureIndexComet,
    /// Number if textures. NOTE! NumberOfTextures must be the LAST enum when adding new textures!.
    NumberOfTextures
};

enum {
        /// Number of levels
        MaxLevel = 20
};

#endif // DEFINES_H
